
package com.choosefine.it.basedata.dao;

import com.choosefine.it.basedata.model.ProjectInfo;
import com.choosefine.it.basedata.model.vo.ProjectInfoNameVO;
import com.choosefine.it.basedata.model.vo.ProjectInfoVO;
import com.choosefine.it.basedata.model.vo.ProjectStartEndTimeVO;
import com.choosefine.it.basedata.model.vo.projectInfoAppVO;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Map;

/**
 * 工程详情相关映射
 * @author guwenwei
 * 2016/11/16
 */
public interface ProjectInfoMapper {

	int deleteByPrimaryKey(Integer id);

	int insert(ProjectInfo record);

	int insertSelective(ProjectInfo record);

	ProjectInfo selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(ProjectInfo record);

	int updateByPrimaryKey(ProjectInfo record);

	ProjectInfo findByProjectCode(String projectCode);

	int deleteByProjectCode(Map<String,Object> projectCode);

	Page<ProjectInfo> selectAll();
	
	/**
	 * 根据项目code查询，对应的项目对象
	 * @auth liaozhanggen 2016-11-18 下午5:37:02
	 */
	ProjectInfo queryProjectInfoByCode(String projectCode);
	
	int countProject();
	Page<ProjectInfo> selectAllByCondition(Map<String, Object> params);
//	Page<ProjectInfo> findAllByCondition(Map<String, Object> params);
	
	int updateProjectInfoProjectDataStatus(Map<String, Object> params);
	Page<ProjectInfo> findProjectAllByCondition(Map<String, Object> params);
	int batchUpdateProjectCourse(Map<String, Object> params);
	int batchDeleteProjects(Map<String, Object> params);
	int saveProjectInfo(ProjectInfo record);
	Page<ProjectInfo>  findProjectInfoByManager(String userCode);

//	Double getTeamProjectCapital(String projectCode);
	
	ProjectInfoVO queryByProjectCode(String projectCode);

	Page<ProjectInfo> findProjectListByUserCode(String userCode);
	
	ProjectInfo selectProjectInfoByName(String name);

	Page<ProjectInfoNameVO> findProjectNameNoPage(Map<String,Object> params);

	Page<ProjectInfoNameVO> findProjectByName(String projectName);

	Page<ProjectInfoNameVO> findProjectName(Map<String, Object> map);
	
	List<projectInfoAppVO> findProjectByUserCodeAndProjectName(Map<String, Object> params);

	List<ProjectStartEndTimeVO> findProjectStartEndTime(String projectCode);

}
